package de.rj.urwalking.data.survey;

import java.io.Serializable;

import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

import de.rj.urwalking.config.Constants;

@Root(name="urw_participants_answer_versions",strict=false)
public class Answer implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Element(name="answer")
	private int intAnswer;
	@Element(name="freetextanswer")
	private String textAnswer;
	@Element(name="timestampanswered")
	private long timestamp;
	@Element(name="timestampstartsection")
	private long startTimestamp;
	@Element(name="islatest")
	private boolean blnIsLatest = false;
	
	public Answer() {
		intAnswer = Constants.UNDEFINED;
		textAnswer = Constants.EMPTY_STRING;
	}

	public Answer(int intAnswer, String textAnswer) {
		this.intAnswer = intAnswer;
		this.textAnswer = textAnswer;
	}

	public int getIntAnswer() {
		return intAnswer;
	}

	public String getTextAnswer() {
		return textAnswer;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setIntAnswer(int intAnswer) {
		this.intAnswer = intAnswer;
	}

	public void setTextAnswer(String textAnswer) {
		this.textAnswer = textAnswer;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public long getStartTimestamp() {
		return startTimestamp;
	}

	public void setStartTimestamp(long timestamp) {
		this.startTimestamp = timestamp;
	}

	public boolean isBlnIsLatest() {
		return blnIsLatest;
	}

	public void setBlnIsLatest(boolean blnIsLatest) {
		this.blnIsLatest = blnIsLatest;
	}
}
